package com.ge.boot08rpc.controller;

import com.ge.boot08rpc.Interface.HttpInterface;
import com.ge.boot08rpc.service.HttpInterfaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import reactor.core.publisher.Mono;

@Controller
public class HttpInterfaceController {

    @Autowired
    HttpInterfaceService interfaceService;

    @Autowired
    HttpInterface factoryClient;

    @GetMapping("/interfaceTest")
    public Mono<String> httpInterfaceTest(@RequestParam("param") String param) {
        return factoryClient.doQuery(param);
    }
}
